home *** CD-ROM | disk | FTP | other *** search
-
-
-
- iiiinnnnooooddddeeee((((4444)))) iiiinnnnooooddddeeee((((4444))))
-
-
-
- NNNNAAAAMMMMEEEE
- inode - format of an Extent File System inode
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ppppaaaarrrraaaammmm....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ffffssss////eeeeffffssss____iiiinnnnoooo....hhhh>>>>
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- An _i_n_o_d_e is the volume data structure used by the Extent File System
- (EFS) to implement the abstraction of a file. (This is not to be
- confused with the _i_n-_c_o_r_e _i_n_o_d_e used by the operating system to manage
- memory-resident EFS files.)
-
- An inode contains the type (for example, plain file, directory, symbolic
- link, or device file) of the file; its owner, group, and public access
- permissions; the owner and group ID numbers; its size in bytes; the
- number of links (directory references) to the file; and the times of last
- access and last modification to the file. In addition, there is a list
- of data blocks claimed by the file.
-
- An inode under the Extent File System has the following structure.
-
- #define EFS_DIRECTEXTENTS 12
-
- /*
- * Extent based filesystem inode as it appears on disk.
- * The efs inode is 128 bytes long.
- */
- struct efs_dinode {
- ushort di_mode; /* type and access permissions */
- short di_nlink; /* number of links */
- ushort di_uid; /* owner's user ID number */
- ushort di_gid; /* group's group ID number */
- off_t di_size; /* number of bytes in file */
- time_t di_atime; /* time of last access (to contents) */
- time_t di_mtime; /* of last modification (of contents) */
- time_t di_ctime; /* of last modification to inode */
- long di_gen; /* generation number */
- short di_numextents; /* # of extents */
- u_char di_version; /* version of inode */
- u_char di_spare; /* UNUSED */
- union {
- extent di_extents[EFS_DIRECTEXTENTS];
- dev_t di_dev; /* device for IFCHR/IFBLK */
- } di_u;
- };
-
- The types _u_s_h_o_r_t, _o_f_f__t, _t_i_m_e__t, and _d_e_v__t are defined in _t_y_p_e_s(5). The
- _e_x_t_e_n_t type is defined as follows:
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- iiiinnnnooooddddeeee((((4444)))) iiiinnnnooooddddeeee((((4444))))
-
-
-
- typedef struct extent {
- unsigned int
- ex_magic:8, /* magic #, must be 0 */
- ex_bn:24, /* bb # on volume */
- ex_length:8, /* length of this extent in bb's */
- ex_offset:24; /* logical file offset in bb's */
- } extent;
-
- _d_i__m_o_d_e contains the type of the file (plain file, directory, and so on),
- and its read, write, and execute permissions for the file's owner, group,
- and public. _d_i__n_l_i_n_k contains the number of links to the inode.
- Correctly formed directories have a minimum of two links: a link in the
- directory's parent and the `.' link in the directory itself. Additional
- links may be caused by `..' links from subdirectories.
-
- _d_i__u_i_d and _d_i__g_i_d contain the user ID and group ID of the file (used to
- determine which set of access permissions apply: owner, group, or
- public). _d_i__s_i_z_e contains the length of the file in bytes.
-
- _d_i__a_t_i_m_e is the time of last access to the file's contents. _d_i__m_t_i_m_e is
- the time of last modification of the file's contents. _d_i__c_t_i_m_e is the
- time of last modification of the inode, as opposed to the contents of the
- file it represents. These times are given in seconds since the beginning
- of 1970 GMT.
-
- _d_i__g_e_n is the inode generation number used to sequence instantiations of
- the inode.
-
- An extent descriptor maps a logical segment of a file to a physical
- segment (extent) on the volume. The physical segment is characterized by
- a starting address and a length, both in basic blocks (of 512 bytes) and
- a logical file offset, also in basic blocks.
-
- _d_i__n_u_m_e_x_t_e_n_t_s is the number of extents claimed by the file. If it is
- less than or equal to _E_F_S__D_I_R_E_C_T_E_X_T_E_N_T_S then the extent descriptors
- appear directly in the inode as _d_i__u._d_i__e_x_t_e_n_t_s[_0 .. _d_i__n_u_m_e_x_t_e_n_t_s-_1].
- When the number of extents exceeds this range, then _d_i__u._d_i__e_x_t_e_n_t_s[_0 ..
- _d_i__u._d_i__e_x_t_e_n_t_s[_0]._e_x__o_f_f_s_e_t-_1] are indirect extents that map blocks
- holding extent information. There are at most _E_F_S__D_I_R_E_C_T_E_X_T_E_N_T_S indirect
- extents.
-
- If the inode is a block or character special inode, _d_i__u._d_i__n_u_m_e_x_e_n_t_s is
- 0, and _d_i__u._d_i__d_e_v contains a number identifying the device.
-
- If the inode is a symbolic link and _d_i__u._d_i__n_u_m_e_x_e_n_t_s is 0, the symbolic
- link path string is stored in the extent descriptor area of the inode. A
- symbolic link is created with in-line data only when the data string fits
- within the extent descriptor area, and the tuneable parameter eeeeffffssss____lllliiiinnnneeee is
- non-zero (see _s_y_s_t_u_n_e(1M)).
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- iiiinnnnooooddddeeee((((4444)))) iiiinnnnooooddddeeee((((4444))))
-
-
-
- FFFFIIIILLLLEEEESSSS
- /usr/include/sys/param.h
- /usr/include/sys/types.h
- /usr/include/sys/inode.h
- /usr/include/sys/stat.h
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- stat(2), efs(4), types(5).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-